package com.bjgzy.courselive.mvp.model;

import com.bjgzy.courselive.mvp.contract.CourseListContract;
import com.eduhzy.ttw.commonsdk.entity.CommonData;
import com.eduhzy.ttw.commonsdk.entity.CourseListData;
import com.eduhzy.ttw.commonsdk.http.CommonApi;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;

import java.util.List;
import java.util.Map;

import javax.inject.Inject;

import io.reactivex.Observable;

/**
 * @author xubo
 * @date 2018-8-27 19:18:09
 */
public class CourseListModel extends BaseModel implements CourseListContract.Model {


    @Inject
    public CourseListModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);
    }

    @Override
    public Observable<CommonData<List<CourseListData>>> getCatalogById(Map<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(CommonApi.class).getCatalogById(map);
    }
}